#include "IMaterialSystem.h"

IMaterial* IMaterialSystem::FindMaterial(char const* pMaterialName, const char *pTextureGroupName, bool complain, const char *pComplainPrefix)
{
	typedef IMaterial* (__thiscall *FindMaterial_t) (void*, char const* pMaterialName, const char *pTextureGroupName, bool complain, const char *pComplainPrefix);
	return VMTWrapper::getfunction<FindMaterial_t>(this, MATSYS_FINDMATERIAL)(this, pMaterialName, pTextureGroupName, complain, pComplainPrefix);
}

unsigned short IMaterialSystem::FirstMaterial()
{
	typedef unsigned short (__thiscall *FirstMaterial_t) (void*);
	return VMTWrapper::getfunction<FirstMaterial_t>(this, MATSYS_FIRSTMATERIAL)(this);
}

IMaterial* IMaterialSystem::GetMaterial(unsigned short handle)
{
	typedef IMaterial* (__thiscall *GetMaterial_t) (void*, unsigned short handle);
	return VMTWrapper::getfunction<GetMaterial_t>(this, MATSYS_GETMATERIAL)(this, handle);
}

int	IMaterialSystem::GetNumMaterials()
{
	typedef int (__thiscall *GetNumMaterials_t) (void*);
	return VMTWrapper::getfunction<GetNumMaterials_t>(this, MATSYS_GETNUMMATERIALS)(this);
}